package com.linln.modules.ticket.domain;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonInclude;
import com.linln.common.utils.DateUtil;
import lombok.Data;

import java.util.Date;


/**
 * @author : pengliang
 * @version V1.0
 * @Project: timo
 * @Package com.linln.modeles.ticket.domain
 * @Descriptio /**
 * @Project: timo
 * @Package com.linln.modeles.ticket.domain
 * @Description: TODO
 * @date Date : 2020年11月23日 13:43
 */

@Data
@JsonInclude(JsonInclude.Include.NON_NULL)
@TableName(value = "tbl_ticket")
public class Ticket {
    /**
     * id
     */
    @TableId(value = "ticket_id", type = IdType.UUID)
    private String ticketId;

    /**
     * 订单类型
     */
    @TableField(value = "order_type")
    private String orderType;
    /**
     * 订单id
     */
    @TableField(value = "order_id")
    private String orderId;

    /**
     * 服务类型
     */
    @TableField(value = "service_type_id")
    private String serviceTypeId;

    /**
     * 购买日期
     */
    @TableField(value = "buy_date")
    private String buyDate;

    /**
     * 状态 0未使用 1已使用
     */
    @TableField(value = "status")
    private Integer status;

    /**
     * 过期日期
     */
    @TableField(value = "`expir_date`")
    private String expirDate;

    /**
     * 开始日期
     */
    @TableField(value = "`start_date`")
    private String startDate;

    /**
     * 券说明
     */
    @TableField(value = "`explain`")
    private String explain;

    /**
     * 使用日期
     */
    @TableField(value = "use_date")
    private String useDate;

    /**
     * 获取渠道 0赠送 1购买
     */
    @TableField(value = "obtain")
    private Long obtain;
    //服务id
    @TableField(value = "service_id")
    private String serviceId;
    //用户id
    @TableField(value = "user_id")
    private long userId;
    //服务券码
    @TableField(value = "ticket_code")
    private String ticketCode;
    //服务券金额
    @TableField(value = "ticket_money")
    private Double ticketMoney;
    //服务券积分
    @TableField(value = "ticket_integral")
    private Integer ticketIntegral;

    //规则id
    @TableField(value = "use_rule_id")
    private String useRuleId;

    //服务名称
    @TableField(value = "service_type_name", exist = false)
    private String serviceTypeName;

    //规则名称
    @TableField(value = "use_rule_name", exist = false)
    private String useRuleName;

}
